package com.dly.hope.repository;

import com.dly.hope.workflow.NodeInfo;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @Name: NodeInfoRepository
 * @Description:
 * @Author: Danny Chen
 * @Date: 2022/1/18
 */
public interface NodeInfoRepository extends JpaRepository<NodeInfo, String> {

    List<NodeInfo> findAllByProcessIdAndDataStatus(String processId, Integer dataStatus);

    Optional<NodeInfo> findByIdAndDataStatus(String id, Integer dataStatus);

    NodeInfo findByProcessIdAndNameAndDataStatus(String processId, String name, Integer dataStatus);

}
